var isArraySpecial = function (nums, queries) {
  const n = nums.length;
  const dp = new Array(n).fill(1);
  for (let i = 1; i < n; i++) {
    if ((nums[i] ^ nums[i - 1]) & 1) {
      dp[i] = dp[i - 1] + 1;
    }
  }

  return dp;
};
isArraySpecial([1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 55, 6, 7, 8, 9, 8, 7, 8, 9]);
